package com.atguigu.gmall.product.mapper;

import com.atguigu.gmall.model.product.BaseTrademark;
import com.atguigu.gmall.model.product.SpuSaleAttr;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Sanmier
 * @create 2020-12-02 9:30
 */
@Service
public interface  SpuSaleAttrMapper extends BaseMapper<SpuSaleAttr> {

    /*
     select *
     from
     多表关联查询
    */
    //获取spuId获取销售属性集合
    List<SpuSaleAttr> selectSpuSaleAttrList(Long spuId);


    //根据spuId，skuId 查询销售属性集合
    List<SpuSaleAttr> selectSpuSaleAttrListCheckBySku(@Param("skuId") Long skuId,
                                                      @Param("spuId") Long spuId);
}
